package wickethub.web.components.validators;

import org.apache.wicket.validation.IValidatable;
import org.apache.wicket.validation.IValidator;
import org.apache.wicket.validation.ValidationError;

import wickethub.data.Util;

public class HttpPositiveResponseValidator implements IValidator<String> {
	
	@Override
	public void validate(IValidatable<String> validatable) {
		
		if (!Util.isURLValid(validatable.getValue())) {
			validatable.error(new ValidationError());
		}

	}
}
